home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
thinkref
/
archive
/
THINKC7.0.4Update.sea.hqx
/
EDS 7.0.4 Update
/
AppleScript.h
next >
Wrap
Text File
|
1994-06-01
|
6KB
|
266 lines
/*
File: AppleScript.h
Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
WARNING
This file was auto generated by the interfacer tool. Modifications
must be made to the master file.
*/
#ifndef __APPLESCRIPT__
#define __APPLESCRIPT__
#ifndef __OSA__
#include <OSA.h>
/* #include <AppleEvents.h> */
/* #include <Types.h> */
/* #include <ConditionalMacros.h> */
/* #include <MixedMode.h> */
/* #include <Traps.h> */
/* #include <Memory.h> */
/* #include <OSUtils.h> */
/* #include <Events.h> */
/* #include <Quickdraw.h> */
/* #include <QuickdrawText.h> */
/* #include <IntlResources.h> */
/* #include <EPPC.h> */
/* #include <PPCToolBox.h> */
/* #include <AppleTalk.h> */
/* #include <Processes.h> */
/* #include <Files.h> */
/* #include <SegLoad.h> */
/* #include <Notification.h> */
/* #include <AEObjects.h> */
/* #include <Components.h> */
#endif
#ifndef __TEXTEDIT__
#include <TextEdit.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
enum {
typeAppleScript = 'ascr',
kAppleScriptSubtype = typeAppleScript,
typeASStorage = typeAppleScript
};
////////////////////////////////////////////////////////////////////////////////
// Script Error Codes
////////////////////////////////////////////////////////////////////////////////
// Runtime errors:
enum {
errASCantConsiderAndIgnore = -2720,
errASCantCompareMoreThan32k = -2721,
// Parser/Compiler errors:
errASTerminologyNestingTooDeep = -2760,
errASIllegalFormalParameter = -2761,
errASParameterNotForEvent = -2762,
errASNoResultReturned = -2763,
/* Dialect specific script errors:
The range -2780 thru -2799 is reserved for dialect specific error codes.
(Error codes from different dialects may overlap.)
English errors:
*/
errASInconsistentNames = -2780
};
////////////////////////////////////////////////////////////////////////////////
// Component Selectors
////////////////////////////////////////////////////////////////////////////////
#define kASSelectInit 0x1001
#define kASSelectSetSourceStyles 0x1002
#define kASSelectGetSourceStyles 0x1003
#define kASSelectGetSourceStyleNames 0x1004
enum {
kASHasOpenHandler = 'hsod'
};
// This selector is used to query a context as to whether it contains
// a handler for the kAEOpenDocuments event. This allows "applets" to be
// distinguished from "droplets." OSAGetScriptInfo returns false if
// there is no kAEOpenDocuments handler, and returns the error value
// errOSAInvalidAccess if the input is not a context.
////////////////////////////////////////////////////////////////////////////////
// Initialization
////////////////////////////////////////////////////////////////////////////////
extern pascal OSAError ASInit(ComponentInstance scriptingComponent, long modeFlags, long minStackSize, long preferredStackSize, long maxStackSize, long minHeapSize, long preferredHeapSize, long maxHeapSize)
FIVEWORDINLINE(0x2F3C, 28, 0x1001, 0x7000, 0xA82A);
// This call can be used to explicitly initialize AppleScript. If it is
// not called, the a scripting size resource is looked for and used. If
// there is no scripting size resource, then the constants listed below
// are used. If at any stage (the init call, the size resource, the
// defaults) any of these parameters are zero, then parameters from the
// next stage are used. ModeFlags are not currently used.
// Errors:
// errOSASystemError initialization failed
// These values will be used if ASInit is not called explicitly, or if any
// of ASInit's parameters are zero:
#ifdef THINK_C
enum {
kASDefaultMinStackSize = (4 * 1024),
kASDefaultPreferredStackSize = (16 * 1024),
kASDefaultMaxStackSize = (16 * 1024),
kASDefaultMinHeapSize = (4 * 1024),
kASDefaultPreferredHeapSize = (16 * 1024),
kASDefaultMaxHeapSize = (32L * 1024 * 1024)
};
#else
enum {
kASDefaultMinStackSize = (4 * 1024),
kASDefaultPreferredStackSize = (16 * 1024),
kASDefaultMaxStackSize = (16 * 1024),
kASDefaultMinHeapSize = (4 * 1024),
kASDefaultPreferredHeapSize = (16 * 1024),
kASDefaultMaxHeapSize = (32 * 1024 * 1024)
};
#endif
////////////////////////////////////////////////////////////////////////////////
// Source Styles
////////////////////////////////////////////////////////////////////////////////
extern pascal OSAError ASSetSourceStyles(ComponentInstance scriptingComponent, STHandle sourceStyles)
FIVEWORDINLINE(0x2F3C, 4, 0x1002, 0x7000, 0xA82A);
// Errors:
// errOSASystemError operation failed
extern pascal OSAError ASGetSourceStyles(ComponentInstance scriptingComponent, STHandle *resultingSourceStyles)
FIVEWORDINLINE(0x2F3C, 4, 0x1003, 0x7000, 0xA82A);
// Errors:
// errOSASystemError operation failed
extern pascal OSAError ASGetSourceStyleNames(ComponentInstance scriptingComponent, long modeFlags, AEDescList *resultingSourceStyleNamesList)
FIVEWORDINLINE(0x2F3C, 8, 0x1004, 0x7000, 0xA82A);
// This call returns an AEList of styled text descriptors the names of the
// source styles in the current dialect. The order of the names corresponds
// to the order of the source style constants, below. The style of each
// name is the same as the styles returned by ASGetSourceStyles.
//
// Errors:
// errOSASystemError operation failed
// Elements of STHandle correspond to following categories of tokens, and
// accessed through following index constants:
enum {
kASSourceStyleUncompiledText = 0,
kASSourceStyleNormalText = 1,
kASSourceStyleLanguageKeyword = 2,
kASSourceStyleApplicationKeyword = 3,
kASSourceStyleComment = 4,
kASSourceStyleLiteral = 5,
kASSourceStyleUserSymbol = 6,
kASSourceStyleObjectSpecifier = 7,
kASNumberOfSourceStyles = 8
};
// Gestalt selectors for AppleScript
enum {
gestaltAppleScriptAttr = 'ascr',
gestaltAppleScriptVersion = 'ascv'
};
enum {
gestaltAppleScriptPresent = 0,
gestaltAppleScriptPowerPCSupport = 1
};
////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
#endif